﻿function CreateSave() {
    var val = $('input:radio[name="sex"]:checked').val();

    var _url = "/System/SystemSettingCreateForm";
    var message = "创建成功!";
    var newAgent = {
        Parametername: $("#ParameternameId").val(),
        Parametervalue: $("#ParametervalueId").val(),
        Status: $('input:radio[name="Status"]:checked').val()
    };

    if ($("#SystemSettingId").val() != "0") {
        newAgent.Id = $("#SystemSettingId").val();
        _url = "/System/SystemSettingUpdateForm";
        message = "更新成功！";
    }
    abp.ajax({
        url: _url,
        data: JSON.stringify(newAgent)
    }).done(function (data) {
        if (data.status == true) {
            abp.message.success(data.errormsg);
        }
        if (data.status == false) {
            abp.message.warn(data.errormsg);
        }
    });
}